using System;
using System.Windows.Forms;
namespace StudentInfoApp
{
    public partial class StudentInfoForm : Form
    {
        private TextBox txtStudentID;
        private TextBox txtName;
        private RadioButton rbMale;
        private RadioButton rbFemale;
        private TextBox txtAge;
        private TextBox txtHometown;
        private CheckBox cbPartyMember;
        private Button btnInputResume;
        private Label lblDisplayInfo;

        public StudentInfoForm()
        {
            InitializeComponent();
        }

        private void InitializeComponent()
        {
            this.txtStudentID = new TextBox();
            this.txtName = new TextBox();
            this.rbMale = new RadioButton();
            this.rbFemale = new RadioButton();
            this.txtAge = new TextBox();
            this.txtHometown = new TextBox();
            this.cbPartyMember = new CheckBox();
            this.btnInputResume = new Button();
            this.lblDisplayInfo = new Label();
            this.SuspendLayout();
            //
            // txtStudentID
            //
            this.txtStudentID.Location = new System.Drawing.Point(120, 30);
            this.txtStudentID.Name = "txtStudentID";
            this.txtStudentID.Size = new System.Drawing.Size(150, 23);
            this.txtStudentID.TabIndex = 0;
            //
            // txtName
            // 
            this.txtName.Location = new System.Drawing.Point(120, 70);
            this.txtName.Name = "txtName";
            this.txtName.Size = new System.Drawing.Size(150, 23);
            this.txtName.TabIndex = 1;
            // 
            // rbMale
            // 
            this.rbMale.AutoSize = true;
            this.rbMale.Location = new System.Drawing.Point(120, 110);
            this.rbMale.Name = "rbMale";
            this.rbMale.Size = new System.Drawing.Size(35, 19);
            this.rbMale.TabIndex = 2;
            this.rbMale.TabStop = true;
            this.rbMale.Text = "男";
            this.rbMale.UseVisualStyleBackColor = true;
            // 
            // rbFemale
            // 
            this.rbFemale.AutoSize = true;
            this.rbFemale.Location = new System.Drawing.Point(180, 110);
            this.rbFemale.Name = "rbFemale";
            this.rbFemale.Size = new System.Drawing.Size(35, 19);
            this.rbFemale.TabIndex = 3;
            this.rbFemale.TabStop = true;
            this.rbFemale.Text = "女";
            this.rbFemale.UseVisualStyleBackColor = true;
            // 
            // txtAge
            // 
            this.txtAge.Location = new System.Drawing.Point(120, 150);
            this.txtAge.Name = "txtAge";
            this.txtAge.Size = new System.Drawing.Size(150, 23);
            this.txtAge.TabIndex = 4;
            // 
            // txtHometown
            // 
            this.txtHometown.Location = new System.Drawing.Point(120, 190);
            this.txtHometown.Name = "txtHometown";
            this.txtHometown.Size = new System.Drawing.Size(150, 23);
            this.txtHometown.TabIndex = 5;
            // 
            // cbPartyMember
            // 
            this.cbPartyMember.AutoSize = true;
            this.cbPartyMember.Location = new System.Drawing.Point(120, 230);
            this.cbPartyMember.Name = "cbPartyMember";
            this.cbPartyMember.Size = new System.Drawing.Size(51, 19);
            this.cbPartyMember.TabIndex = 6;
            this.cbPartyMember.Text = "党员";
            this.cbPartyMember.UseVisualStyleBackColor = true;
            this.cbPartyMember.CheckedChanged += new System.EventHandler(this.cbPartyMember_CheckedChanged);
            // 
            // btnInputResume
            // 
            this.btnInputResume.Location = new System.Drawing.Point(120, 270);
            this.btnInputResume.Name = "btnInputResume";
            this.btnInputResume.Size = new System.Drawing.Size(150, 30);
            this.btnInputResume.TabIndex = 7;
            this.btnInputResume.Text = "输入简历";
            this.btnInputResume.UseVisualStyleBackColor = true;
            this.btnInputResume.Click += new System.EventHandler(this.btnInputResume_Click);
            // 
            // lblDisplayInfo
            // 
            this.lblDisplayInfo.AutoSize = true;
            this.lblDisplayInfo.Location = new System.Drawing.Point(120, 320);
            this.lblDisplayInfo.Name = "lblDisplayInfo";
            this.lblDisplayInfo.Size = new System.Drawing.Size(0, 15);
            this.lblDisplayInfo.TabIndex = 8;
            // 
            // StudentInfoForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(384, 361);
            this.Controls.Add(this.lblDisplayInfo);
            this.Controls.Add(this.btnInputResume);
            this.Controls.Add(this.cbPartyMember);
            this.Controls.Add(this.txtHometown);
            this.Controls.Add(this.txtAge);
            this.Controls.Add(this.rbFemale);
            this.Controls.Add(this.rbMale);
            this.Controls.Add(this.txtName);
            this.Controls.Add(this.txtStudentID);
            this.Name = "StudentInfoForm";
            this.Text = "学生信息窗体";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        private void cbPartyMember_CheckedChanged(object sender, EventArgs e)
        {
            if (cbPartyMember.Checked)
            {
                lblDisplayInfo.Text = $"入党时间：2005年";
            }
            else
            {
                lblDisplayInfo.Text = "";
            }
        }

        private void btnInputResume_Click(object sender, EventArgs e)
        {
            // 打开简历输入窗体的逻辑
            ResumeForm resumeForm = new ResumeForm();
            resumeForm.ShowDialog();
        }
    }
}
